package com.pronosticnews.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.pronosticnews.client.util.InformationMessage;

public class InformationMessageEvent extends GwtEvent<InformationMessageEventHandler> {
	public static Type<InformationMessageEventHandler> TYPE = new Type<InformationMessageEventHandler>();

	private InformationMessage message;
	
	public InformationMessageEvent(InformationMessage message) {
		this.message = message;
	}

	@Override
	public Type<InformationMessageEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(InformationMessageEventHandler handler) {
		handler.onReceive(this);
	}

	public InformationMessage getMessage() {
		return message;
	}

	public void setMessage(InformationMessage message) {
		this.message = message;
	}

}
